Tkinter exit does not work

by: ATJAlan, 8 years ago


In your tkinter tutorial you have

def client_exit(self):
        exit()


This does not work for me (using python 2.7 on windows 10). The program is stopped but the window remains.
I sorted this by using

def client_exit(self):
        self.master.destroy()
exit()


In your bitcoin mega series you have

button2 = ttk.Button(self, text="Disagree",
                            command=quit)

Again this does not workleaving the window unresponsive. I have tried to do the same as before with

button2 = ttk.Button(self, text="Disagree",
                            command=controller.destroy())

but that does not work.



You must be logged in to post. Please login or register an account.



Thanks for the update. Worked on windows 7 in the series, but maybe things have changed in time. Thanks for sharing the update!

-Harrison 8 years ago

You must be logged in to post. Please login or register an account.